package com.mamingchao.basic.chain;

/**
 * 链的node定义
 * Created by mlamp on 2025/3/6.
 */
public class ChainNode {

    private String value;
    private ChainNode pre;
    private ChainNode next;

    public ChainNode(String value){
        this.value = value;
        this.pre = null;
        this.next = null;
    }

    public ChainNode(String value, ChainNode pre, ChainNode next){
        this.value = value;
        this.pre = pre;
        this.next = next;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public ChainNode getPre() {
        return pre;
    }

    public void setPre(ChainNode pre) {
        this.pre = pre;
    }

    public ChainNode getNext() {
        return next;
    }

    public void setNext(ChainNode next) {
        this.next = next;
    }
}
